{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import pandas as pd\n",
    "plt.rcParams['figure.figsize'] = 8,4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def sigm_scale(x,A_tp,A_fp,window=1):\n",
    "    y = (A_tp-A_fp)*(1/(1+np.exp(5*x/window))) + A_fp\n",
    "    y[:len(x[x<-3])] = A_fp\n",
    "    return y "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = np.linspace(-4,3,400)\n",
    "x1 = np.linspace(-1,6,400)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgYAAAEMCAYAAAC/TH5bAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3dd5xU5dn/8c8Fu/SmYEVEEbErsQJRQxIVjIBdsSXqoyb4M3lI1CQKdsXyiPJEH7tGBWNBUMAWBZmIihCwIaEIIkUUBBxg6btcvz/O7Dhly2w9M7Pf9+t1XnvOfdo1uzNnr7nvc+7b3B0RERERgEZhByAiIiLZQ4mBiIiIxCkxEBERkTglBiIiIhKnxEBERETiCsIOIBt06NDB99prr1o95oYNG2jZsmWtHjPbzJsHJSUlHHhg47BDqXMN4e/ZEF4jNIzXqc9m/qmL1zlz5sxV7r5TarkSA2CvvfZixowZtXrMSCRC7969a/WY2aZ3b4hGo8yY0S7sUOpcQ/h7NoTXCA3jdeqzmX/q4nWa2eKyytWUICIiInGqMZBqGzoUPvtsMZD/30pEcok+m1IT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SYG7j7O3c8GdiO4WfBsYKmZjTezM82sMJOTuPvb7j45YXmGu79bk8AlHKk1BsuX6+IjDcOAAQM44IDkvgFuu+22kKKp2G9/C/fdt1/YYUiOynTY5ai7P+ruxwIHADOA+4Fv6zI4yT56KkEaqkaNGvGXv/wlqezNN9/k/fffDykikbpRpat6bKjko4BjCMY7mFUXQUn20lMJ0pCdf/757LPPPkll1113nZ5QkLySaZfIx5rZY8AK4HbgI6Cbu/+8LoOT7KMOjqQhKyws5NZbb00qe//993nrrbdCikik9lX2uOLNZrYQmBArOsXdu7n7bRmOrCh5Rk0J0tANHDiQQw89NKns2muvZds2Pbor+aGyq3oPgicKdnP3K9z9g3qISbJYapXpbrttDSkSkXA0atSIO+64I6ls9uzZPPTQQyFFlG7oULjoIn13k+qp7KmEvu7+ggY8klLp/RgUhxSJSHhOOeUUfvGLXySV3XjjjaxYsSKkiJKdcAIccUQmPdaLpFM9sFRJamKwaVNGT6yK5BUz44EHHqCg4Md+PNatW8c111wTYlQ/+vRTWLCgVdhhSI5SYiBVktqUsHRpy5AiEQnXgQcemNZV8qhRoxg/fnxIEf1o8GB48MGuYYchOUqJgVSJnkoQ+dFNN93EbrvtllR2xRVXsHq1uiOW3KXEQKokPTHQW0garjZt2vD4448nla1YsYIrrrhCfRtIztJVXapEjyuKJDvllFO45JJLksrGjh3LiBEjQopIpGZ0VZcqSf8WpKYEkfvvv59OnTollV177bVMmTIlpIhEqk+JgVRJao3BXnttCikSkezRtm1bXnrpJQoLf3xKp6SkhDPOOIMvv/yy3uMZNgwuu+yrej+v5AclBlIlqYlB27YlIUUikl169OjB8OHDk8pWrVpF3759671/g1694OCD19XrOSV/KDGQKkltSli/vklIkYhkn6uuuooLL7wwqeyrr77ixBNPZOXKlfUWx4cfwhdftKm380l+UWIgVZJaY7BoUeuQIhHJPmbGk08+mdYr4qxZs+jduzfffls/I9Vffz088USXejmX5B8lBlIl6U8l6OZDkURNmjRh7NixaQMtzZkzhx49ejBrlkarl+ymxECqRE8liFSubdu2TJw4MS05WLJkCb169WLs2LEhRSZSOSUGUiXq4EgkMzvttBPvvvsuhx9+eFJ5UVERZ555Jr/73e/YuHFjSNGJlE9XdakSdXAkkrn27dszefJkTjnllLR1jz76KAcddBCvv/56CJGJlE9XdamS1KaE/fffEFIkIrmhTZs2jBs3jquvvjpt3ddff02/fv046aSTmDp1aq2dc8QIuOqqBbV2PGlYlBhIlaTWGLRpUxxSJCK5o3Hjxtx7772MGzeO9u3bp61/55136NWrF3379uXtt98uo8muarp3h65di2p0DGm4lBhIlaResNasaRZSJCK5Z8CAAXz++eecccYZZa7/5z//SZ8+fdhnn324/fbbq91r4sSJMHPmDjUJVRowJQZSJalNCQsXqhMVkarYfffdGTNmDK+99hrdunUrc5uvv/6aG264gW7dunHggQfy17/+lbfffpv169dndI7bb4eRIzvXZtjSgCgxkCpJr+LU44oi1XHKKacwe/Zsnn32Wbp27VrudnPmzOHuu++mT58+7LDDDhx55JFcfvnlPPDAA0QiEVavXl2PUUtDUBB2AJJblBiI1J6CggIuuugizjvvPF5++WUee+wxJk+eXO72JSUlzJw5k5kzZyaVt2nThs6dO8enpUs7s21bS157bU/at29P+/bt6dChA+3ataNRI30flIrlXGJgZgXALKCxu5ddDxeSefPmMWfOHAC++OILotFoyBHVvtLXV0qPK4rUXEFBAQMHDmTgwIF8+eWX/P3vf+eVV15h7ty5Ge2/bt06Zs2aldarYv/+yduZGS1btqRly5a0atUqPl86NWnShMLCwviUupw4NW7cmEaNGmFmNf5ZOlWmrG1mz56dNA5FdY+T7duU/k85+OCDK6xhqg05lxgAg4CdgXZm1tLds+Z5uTFjxjBkyJCww6hnqjEQqU377rsvw4YNY9iwYcyfP5/x48czefJkPvjgA9auXVujY7s7RUVFFBUV1fuIj1I77rvvPv74xz/W6TlyKjEws3bATcBVwDPAwcC0mh533jzo3Tu57Jxz4MorYeNG+NWv0ve5+OJgWrUKzjorKFu8uKaR5J5ddtmW9rsDeOMNaNECHnoIXnopfX0kEvy891547bXkdc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s08Ttj044VgVcvcFBKO+9Y8lBwP4MTHoDJxdetzYsY8l+MZfnqUJ84uB3WPzu8eWS89bRFAr0NHd3wUeBP4PWGFmj5lZm0ziT5F6ju2xeDombPNdwvxGoFU1ziOStZQYiOQBd/8X8DTBN1wIhqHdBBzk7u1iU9vYjYpJYsMuPw5cBbSPNRd8AVjp4TMIobQ54VTgP7FkAYJ/qiMTYmjn7i3d/a4KjtUpYX5PoLS6fzlBolEad0ugPfBN7HfwN3c/AjiIoEnh2jKOXdlrST2HxeL5ppL9RPKGEgOR/DECONHMuse+6T4O3G9mOwOYWUcz61PGfi0J/mF+H9vuEoIag1IrgD1S2tlTvUDQzj+IH2sLAEYR1CT0MbPGZtYs1odCRY8L/j8z28PMdgSuB16Mlf8DuMTMuptZU4KmkWnu/rWZHWVmx5hZIbAB2EzwGGeqFUB7M2tbzrlfAk4xs1/GjnU1sAX4sIJ4RfKKEgORPOHu3wPPAqWd+fyF4GbEj8xsHTAR2K+M/f4DDAemEvzjPAT4IGGTd4HZwHdmtqqcc38b278XP/4jx92XEtQiXE+QeCwl+CZf0bXnH8DbwFex6fbYsSbFXtsY4FuCmxNL75loQ5AI/UDQFLCaH2tPEuOcS1C78VWsaWP3lPXzCO6LeICg1qU/wSOhWyuIVySvqIMjEckasU6bLnP3iWHHItJQqcZARERE4pQYiIiISJyaEkRERCRONQYiIiISp8RARERE4pQYiIiISJwSAxEREYlTYiAiIiJx/x8EhTl25crlWQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 576x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.axvline(4,c='b',ls='--')\n",
    "plt.axvline(-0,c='b',ls='--')\n",
    "plt.axhline(1,c='b',ls='--')\n",
    "plt.axhline(-1,c='b',ls='--')\n",
    "plt.plot(x1,sigm_scale(x,1,-1),linewidth=4.1,c='black')\n",
    "plt.grid()\n",
    "plt.ylim(-1.4,1.4)\n",
    "plt.yticks([1,0.0,-1],labels=['$A_{tp}$',0.0,'$A_{fp}$'],size=12)\n",
    "plt.xticks(size=12)\n",
    "plt.xlabel('Relative position',size=12)\n",
    "plt.ylabel('Value of sigmoid \\n scoring function',size=12)\n",
    "plt.savefig(fname='sigm_nab', fmt='png', dpi=150)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "pd.DataFrame(sigm_scale(x,1,-1), index=x,columns=['Sigmoid scoring function']).to_csv('sigm_nab.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
